export const F_XCZDX_REF_ID_ = 'F_XCZDX_REF_ID_';
export enum NODE_TYPE {
  // 1、反馈公开2、研究整改工作3、整改方案4、整改台账5、整改公开6、整改报告
  OPINION = '1',
  MEETING = '2',
  PROGRAMME = '3',
  BOOK = '4',
  RECTIFICATION = '5',
  REPORT = '6',
}

export const NODE_TYPE_ENUM = {
  反馈公开: NODE_TYPE.OPINION,
  研究整改工作: NODE_TYPE.MEETING,
  整改方案: NODE_TYPE.PROGRAMME,
  整改台账: NODE_TYPE.BOOK,
  整改公开: NODE_TYPE.RECTIFICATION,
  整改报告: NODE_TYPE.REPORT,
};

export const NODE_KEY = {
  [NODE_TYPE.OPINION]: 'opinion',
  [NODE_TYPE.MEETING]: 'meeting',
  [NODE_TYPE.PROGRAMME]: 'programme',
  [NODE_TYPE.BOOK]: 'book',
  [NODE_TYPE.RECTIFICATION]: 'rectification',
  [NODE_TYPE.REPORT]: 'report',
};

export enum STATUS_TEXT {
  NORMAL = '',
  PENDING = '待处理',
  PROCESSED = '已处理',
}

export enum STATUS_VALUE {
  NORMAL = '0',
  PENDING = '1',
  PROCESSED = '2',
}

export enum APPROVAL {
  ACCESS = 1,
  DENIED = 2,
}

export const APPROVAL_ENUM = {
  [APPROVAL.ACCESS]: '同意',
  [APPROVAL.DENIED]: '驳回',
};

export enum APPROVAL_REPORT {
  COMPLETE = 1,
  KEEP = 2,
  WAIT = 3,
}

export const APPROVAL_REPORT_ENUM = {
  [APPROVAL_REPORT.COMPLETE]: '已完成整改',
  [APPROVAL_REPORT.KEEP]: '已取得阶段性成效需长期坚持整改',
  [APPROVAL_REPORT.WAIT]: '尚未整改',
};

export enum RECTIFY {
  ACCESS = 1,
  DENIED = 2,
}

export const RECTIFY_ENUM = {
  [RECTIFY.ACCESS]: '接受意见并整改',
  [RECTIFY.DENIED]: '无法整改',
};

export enum WARNING {
  DAY = 1,
  WEEK = 2,
  MONTH = 3,
}

export enum LEVEL {
  AREA = 1,
  DEPUTY_AREA = 2,
  HALL = 3,
  DEPUTY_HALL = 4,
  PLACE = 5,
  DEPUTY_PLACE = 6,
  MEMBER = 7,
  DEPUTY_MEMBER = 8,
  OTHER = 9,
  NORMAL = 10,

}

export const LEVEL_ENUM = {
  [LEVEL.AREA]: '省部级正职',
  [LEVEL.DEPUTY_AREA]: '省部级副职',
  [LEVEL.HALL]: '厅局级正职',
  [LEVEL.DEPUTY_HALL]: '厅局级副职',
  [LEVEL.PLACE]: '县处级正职',
  [LEVEL.DEPUTY_PLACE]: '县处级副职',
  [LEVEL.MEMBER]: '乡科级正职',
  [LEVEL.DEPUTY_MEMBER]: '乡科级副职',
  [LEVEL.OTHER]: '其他',
  [LEVEL.NORMAL]: '无行政级别',
};

export type HANDLE_APPROVAL_TYPE = keyof typeof APPROVAL_STATE;
export const APPROVAL_STATE = {
  1: '待审批',
  2: '审批通过',
  3: '审批未通过',
  4: '进一步更改待审批',
  5: '进一步整改通过',
  6: '进一步整改未通过',
};

export const MEETING_APPROVAL_ENUM = {
  1: '同意',
  2: '驳回',
};

export type HANDLE_STATUS_TYPE = keyof typeof HANDLE_STATUS;

export const HANDLE_STATUS = {
  0: STATUS_TEXT.NORMAL,
  1: STATUS_TEXT.PENDING,
  2: STATUS_TEXT.PROCESSED,
};

export enum TIMEOUT_ENUM {
  DAY = '1',
  WEEK = '2',
  MONTH = '3',
}

export const SP_NODE = 'SP_NODE';

export enum INodeState {
  // 状态1待审批2审批通过3审批未通过4进一步更改待审批5进一步整改通过6进一步整改未通过
  WAIT = '1',
  PASS = '2',
  FAIL = '3',
  AGAIN_WAIT = '4',
  AGAIN_PASS = '5',
  AGAIN_FAIL = '6',
}

export const APP_TEXT = '整改监督';
export const EXPORT_DATA = [APP_TEXT, 'data'];
export const EXPORT_FILE = [APP_TEXT, 'file'];
export const FILL_NAME = [...EXPORT_DATA, 'lanjian_data'];
export const LANHAI_SYSTEM = [...EXPORT_DATA, 'lanhai_system'];
export const UPLOAD_BASE = '数据融合升级包';

export const OPINION_TEXT = '反馈意见';
export const BOOK_TEXT = '整改台账';
export const PROGRAMME_TEXT = '整改方案';
export const MEETING_TEXT = '研究整改工作';
export const REPORT_TEXT = '整改报告';
export const RECTIFICATION_TEXT = '整改公开';

export enum MB_KEYS {
  NOTIFICATION = 4,
  PUBLISH = 3,
  INISIDE = 2,
  COMPLETE = 1,
}

export enum WOKER {
  BRANCH = 1,
  GENERAL_BRANCH = 2,
  ALL_LEVELS = 3,
  SECRETARY = 4,
  DEPUTY = 5,
  MEMBER = 6,
}

export const WOKER_ENUM = {
  [WOKER.BRANCH]: '支部',
  [WOKER.GENERAL_BRANCH]: '总支',
  [WOKER.ALL_LEVELS]: '各级党委委员',
  [WOKER.SECRETARY]: '书记',
  [WOKER.DEPUTY]: '副书记',
  [WOKER.MEMBER]: '党组成员',
};

export enum QUESTION {
  A = 0,
  B = 1,
  C = 2,
  D = 3,
}

export const QUESTION_ENUM = {
  [QUESTION.A]: 'A：聚焦基层贯彻落实党的路线方针政策和党中央决策部署情况，进一步促进基层党组织和党员干部担当作为',
  [QUESTION.B]: 'B：聚焦群众身边腐败问题和不正之风，进一步增强群众获得感幸福感安全感',
  [QUESTION.C]: 'C：聚焦基层党组织软弱涣散，组织力欠缺问题，进一步强化政治功能、打造坚强战斗堡垒',
  [QUESTION.D]: 'D：整改不到位',
};

export enum DATA_SOURCE {
  BZXC_DADA = 'lanjian_data',
  LANHAI_SYSTEM = 'lanhai_system',
}

export enum FILL_TABLE_COLLECTION {
  MEETING = 'meeting',
  OPINION = 'opinion',
  PROGRAMME = 'programme',
  BOOK = 'book',
  RECORD = 'record',
  REPORT = 'report',
  RECTIFICATION = 'rectification',
  CONFIG = 'config',
  PROGRAME_BOOK = 'programme_book',
  SERVER = 'serve',
  TIMEOUT = 'timeout',
  EXAMPLE = 'example',
  SP_DEF = 'sp_def',
}

export enum TABLE_COLLECTION {
  OPINION = 'fkyjb_',
  OPINION_RELATION = 'fkyjxqb_',
  PROGRAMME = 'w_zgfa',
  PROGRAMME_LS = 'w_zgfa_ls',
  MEETING = 'w_zghy',
  MEETING_LS = 'w_zghy_ls',
  BOOK = 'w_zgtz',
  BOOK_LS = 'w_zgtz_ls',
  RECTIFICATION = 'w_zggk',
  RECTIFICATION_LS = 'w_zggk_ls',
  REPORT = 'w_zgbg',
  REPORT_LS = 'w_zgbg_ls',
  SP_NODE = 'w_sp_node',
  SP_DEF = 'w_sp_def',
  SP_HISTORY = 'w_sp_history',
  LANHAI_SYSTEM = 'sys_datasource_def',
  SYS_FILE = 'sys_file',
  EXAMPLE = 'mbpz_',
  SERVER = 'w_fwqpz',
  TIMEOUT = 'w_yjpz',
}

export interface IFillTableMap {
  [key: string]: {
    table: string
    data: any
  }
}
export const FILL_TABLE_MAP: IFillTableMap = {
  [TABLE_COLLECTION.PROGRAMME]: {
    table: 'programme_book',
    data: {},
  },
  [TABLE_COLLECTION.PROGRAMME_LS]: {
    table: 'record',
    data: {
      module: 'programme',
    },
  },
  [TABLE_COLLECTION.BOOK]: {
    table: 'programme_book',
    data: {},
  },
  [TABLE_COLLECTION.BOOK_LS]: {
    table: 'record',
    data: {
      module: 'book',
    },
  },
  [TABLE_COLLECTION.MEETING]: {
    table: 'meeting',
    data: {},
  },
  [TABLE_COLLECTION.MEETING_LS]: {
    table: 'record',
    data: {
      module: 'meeting',
    },
  },
  [TABLE_COLLECTION.RECTIFICATION]: {
    table: 'rectification',
    data: {},
  },
  [TABLE_COLLECTION.RECTIFICATION_LS]: {
    table: 'record',
    data: {
      module: 'rectification',
    },
  },
  [TABLE_COLLECTION.REPORT]: {
    table: 'report',
    data: {},
  },
  [TABLE_COLLECTION.REPORT_LS]: {
    table: 'record',
    data: {
      module: 'report',
    },
  },
  [TABLE_COLLECTION.OPINION]: {
    table: 'opinion',
    data: {},
  },
  [TABLE_COLLECTION.OPINION_RELATION]: {
    table: 'opinion',
    data: {},
  },
};
